#include <string>
using namespace std;
bool isSubsequence(string s, string t) {
  if (s.empty())
    return true;
  int p = 0;
  for (char c : t) {
    if (s[p] == c) {
      p++;
      if (p == s.size())
        return true;
    }
  }
  return false;
}